package lab02.test09;

public class Student {
    //属性:“学号”、“班号”、“姓名”、“性别”、“年龄”
    private String sNumber;
    private String cNumber;
    private String name;
    private String sSex;
    private int age;

    //方法：“获得学号”、“获得班号”、“获得性别”、“获得姓名”、“获得年龄”、“获得年龄”

    public void setsNumber(String sNumber) {
        this.sNumber = sNumber;
    }

    public void setcNumber(String cNumber) {
        this.cNumber = cNumber;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setsSex(String sSex) {
        this.sSex = sSex;
    }

    public void setAge(int age) {
        this.age = age;
    }

    //方法toString
    @Override
    public String toString() {
        return "学号：" + sNumber + "\t 班号：" + cNumber + "\t 姓名：" +
                name + "\t性别：" + sSex + "\t年龄：" + age;
    }
}
